<html>
<head><meta charset="utf-8"><title>multi-segment paths in const generic arguments · project-const-generics · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/index.html">project-const-generics</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/multi-segment.20paths.20in.20const.20generic.20arguments.html">multi-segment paths in const generic arguments</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="212924028"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/multi-segment%20paths%20in%20const%20generic%20arguments/near/212924028" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> varkor <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/multi-segment.20paths.20in.20const.20generic.20arguments.html#212924028">(Oct 10 2020 at 16:50)</a>:</h4>
<p>I'm deliberating whether <a href="https://github.com/rust-lang/rust/issues/77773">https://github.com/rust-lang/rust/issues/77773</a> is something I think we ought to prioritise investigating before stabilising <code>min_const_generics</code>. I do think this is a frustrating issue that we're going to have to fix at <em>some</em> point, in which case the sooner the better.</p>



<a name="212955242"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/multi-segment%20paths%20in%20const%20generic%20arguments/near/212955242" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/multi-segment.20paths.20in.20const.20generic.20arguments.html#212955242">(Oct 11 2020 at 08:25)</a>:</h4>
<p>I personally don't think we have to get this to work before stabilizing <code>min_const_generics</code>but also would be happy if we get this to work before than <span aria-label="laughing" class="emoji emoji-1f606" role="img" title="laughing">:laughing:</span></p>
<p>I don't think that I frequently hit that issue and as long as the error message is good enough I don't mind the current limitation</p>



<a name="212955247"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/multi-segment%20paths%20in%20const%20generic%20arguments/near/212955247" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/multi-segment.20paths.20in.20const.20generic.20arguments.html#212955247">(Oct 11 2020 at 08:25)</a>:</h4>
<p>I do want to rework the way we emit generic arg mismatch errors though</p>



<a name="212961933"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/multi-segment%20paths%20in%20const%20generic%20arguments/near/212961933" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> varkor <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/multi-segment.20paths.20in.20const.20generic.20arguments.html#212961933">(Oct 11 2020 at 11:36)</a>:</h4>
<p>The implementation until lowering seems straightforward enough. I can't picture exactly how it should disambiguate during type-checking yet (maybe just lazily). I would try this myself, but I won't have much time in the next few weeks. (Maybe after that if no-one else has.)</p>



<a name="212961976"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/multi-segment%20paths%20in%20const%20generic%20arguments/near/212961976" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> varkor <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/multi-segment.20paths.20in.20const.20generic.20arguments.html#212961976">(Oct 11 2020 at 11:36)</a>:</h4>
<p><span class="user-mention silent" data-user-id="216206">lcnr</span> <a href="#narrow/stream/260443-project-const-generics/topic/multi-segment.20paths.20in.20const.20generic.20arguments/near/212955247">said</a>:</p>
<blockquote>
<p>I do want to rework the way we emit generic arg mismatch errors though</p>
</blockquote>
<p>I do think this would go a long way to improving the situation.</p>



<a name="212961998"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/multi-segment%20paths%20in%20const%20generic%20arguments/near/212961998" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/multi-segment.20paths.20in.20const.20generic.20arguments.html#212961998">(Oct 11 2020 at 11:37)</a>:</h4>
<p>yeah, I previously talked with <span class="user-mention" data-user-id="326189">@jknodt</span> about this and the current way is really unfortunate. It works quite well with type and lt params, but const params are too similar to type params for this to stay true.</p>



<a name="212962040"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/multi-segment%20paths%20in%20const%20generic%20arguments/near/212962040" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/multi-segment.20paths.20in.20const.20generic.20arguments.html#212962040">(Oct 11 2020 at 11:38)</a>:</h4>
<p>think I should be able to get to this in the next week</p>



<a name="212977286"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/multi-segment%20paths%20in%20const%20generic%20arguments/near/212977286" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> jknodt <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/multi-segment.20paths.20in.20const.20generic.20arguments.html#212977286">(Oct 11 2020 at 19:01)</a>:</h4>
<p>Specifically for the way the type/const params have their order checked seems to depend on types &amp; consts to be similar and I assume a similar treatment throughout a lot of the code</p>



<a name="213580245"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/multi-segment%20paths%20in%20const%20generic%20arguments/near/213580245" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/multi-segment.20paths.20in.20const.20generic.20arguments.html#213580245">(Oct 16 2020 at 16:07)</a>:</h4>
<p><span class="user-mention silent" data-user-id="216206">lcnr</span> <a href="#narrow/stream/260443-project-const-generics/topic/multi-segment.20paths.20in.20const.20generic.20arguments/near/212962040">said</a>:</p>
<blockquote>
<p>think I should be able to get to this in the next week</p>
</blockquote>
<p>looks like life got in the way so I won't get to it in the next few weeks</p>



<a name="213580445"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/multi-segment%20paths%20in%20const%20generic%20arguments/near/213580445" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/multi-segment.20paths.20in.20const.20generic.20arguments.html#213580445">(Oct 16 2020 at 16:09)</a>:</h4>
<p>if someone else wants to look into making the current error less noisy, maybe by merging the ty and ct mismatch errors into 1 this is probably good enough for now</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>